package com.zto.sch.invoke;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @program: javatest
 * @description:
 * @author: sch
 * @create: 2020-09-16 21:21
 **/
public class MyInvocationHandler2 implements InvocationHandler {
    private Object target;

    public MyInvocationHandler2(Object target) {
        this.target = target;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("我是代理方法2...");
        return method.invoke(target, args);
    }
}
